<?php 
require_once($_SERVER['DOCUMENT_ROOT']."/model/data_access.php");
require_once($_SERVER['DOCUMENT_ROOT']."/model/data_service.php");
    if (isset($_GET) && array_key_exists("hotel_id",$_GET))
    {
        
        $hotel_id = $_GET["hotel_id"];
        //echo $hotel_id . "<br/>";
        $len = get_lan();
        $map_id=MAP_ID;
        $map_key=MAP_KEY;
        
        $hotel_instance = get_hotel($hotel_id,$len);
        $hotel_img_small = json_decode($hotel_instance["EntityImageSetSmall"]);
        $hotel_img_normal = json_decode($hotel_instance["EntityImageSetNormal"]);
        $hotel_img_small_slice = array_slice($hotel_img_small,0,SLIDESHOWLEN);
        $queue_count = (int)(count($hotel_img_small)/SLIDESHOWLEN) ;
        (count($hotel_img_small)%SLIDESHOWLEN) != 0?$queue_count+=1:NULL;
        $full_search_key = $hotel_instance["ContinentName_{$len}"] . "," . $hotel_instance["CountryName_{$len}"] . "," . $hotel_instance["CityName_{$len}"];
        //session_start();
        //pass value to module 
        //$_SESSION["location_hotel_name"] = $full_search_key;
        //var_dump($hotel_img_small);
        list($pre_hotel_instance,$next_hotel_instance) = get_nearest_hotels($hotel_id);
        //$_GET["location_hotel_name"] = $full_search_key;
        //echo $hotel_instance["ContinentName_{$len}"] . "," . $hotel_instance["CountryName_{$len}"] . "," . $hotel_instance["CityName_{$len}"];
        require_once($_SERVER['DOCUMENT_ROOT']."/view/detail.php.html");
    } 
        ?>